/*
 * @Author: 九阳
 * @Date: 2021-11-24 14:22:06
 * @LastEditors: 九阳
 * @LastEditTime: 2021-11-27 10:28:23
 */
export const tableColumns = {
  title: "测试表格", // 标题
  url: "", // 查询接口
  rowSelection: true,
  rowExpanded: true,
  pageQuery: {
    total: 0, // 总数
    current: 1, // 当前页码
    pageSize: 10, // 每页显示数量
    defaultQuery: {}, // 默认查询条件
  },
  columns: [
    {
      title: "姓名",
      width: 100,
      dataIndex: "name",
      key: "name",
      // fixed: "left",
    },
    {
      title: "性别",
      width: 100,
      dataIndex: "name2",
      key: "name2",
      // fixed: "left",

      slots: { customRender: "name2" },
      vsCode: "vueSelectSex", // 小代码编码
    },
    {
      title: "标题3",
      width: 100,
      dataIndex: "name3",
      key: "name3",
      // fixed: "left",
    },
    {
      title: "标题4",
      width: 100,
      dataIndex: "name4",
      key: "name4",
      // fixed: "left",
    },
    {
      title: "标题5",
      width: 100,
      dataIndex: "name5",
      key: "name5",
      // fixed: "left",
    },
    {
      title: "操作",
      width: "120px",
      key: "operation",
      fixed: "right",
      slots: { customRender: "operation" },
    },
  ],
  header: [
    {
      type: "input",
      field: "name",
      label: "名称",
      placeholder: "请输入姓名",
    },
    {
      type: "select",
      field: "select",
      label: "选择",
      placeholder: "请选择性别",
      vsCode: "vueSelectSex",
    },
    // {
    //   type: "year",
    //   field: "year",
    //   label: "年",
    //   placeholder: "请选择年",
    // },
    {
      type: "month",
      field: "month",
      label: "月",
      placeholder: "请选择月",
    },
    {
      type: "week",
      field: "week",
      label: "周",
      placeholder: "请选择周",
    },
    {
      type: "date",
      field: "date",
      label: "日期",
      placeholder: "请输入姓名2",
    },
    {
      type: "dateTime",
      field: "dateTime",
      label: "日期时间",
      placeholder: "请输入姓名2",
    },
    {
      type: "range",
      field: "range",
      label: "日期范围",
      placeholder: "请输入姓名2",
      startDate: "range01",
      endDate: "range02",
    },
    // {
    //   type: "rangeTime",
    //   field: "rangeTime",
    //   label: "日期时间范围",
    //   placeholder: "请输入姓名2",
    //   startDate: 'rangeTime01',
    //   endDate: 'rangeTime02',
    // },
  ],
};

export const formColumns = [
  {
    type: "input",
    field: "input",
    label: "文本",
    placeholder: "输入文本",
    span: "6",
    required: true,
    rule: [
      { required: true, message: "输入文本", trigger: "blur" },
      { min: 1, max: 15, message: "最大输入15字符", trigger: "blur" },
    ],
  },
  {
    type: "date",
    subType: "date",
    field: "date",
    label: "日期",
    placeholder: "输入日期",
    span: "6",
    required: true,
    rule: [{ required: true, message: "选择日期", trigger: "blur" }],
  },
  {
    type: "date",
    subType: "year",
    field: "year",
    label: "年",
    placeholder: "输入年",
    span: "6",
    required: false,
  },
  {
    type: "date",
    subType: "month",
    field: "month",
    label: "月",
    placeholder: "输入月",
    span: "6",
    required: false,
  },
  {
    type: "date",
    subType: "week",
    field: "week",
    label: "周",
    placeholder: "输入周",
    span: "6",
    required: false,
  },
  {
    type: "date",
    subType: "dateTime",
    field: "dateTime",
    label: "日期时间",
    placeholder: "输入日期时间",
    span: "6",
    required: false,
  },
  {
    type: "date",
    subType: "range",
    field: "range",
    label: "日期范围",
    placeholder: "输入日期范围",
    span: "6",
    required: false,
    startDate: "range01",
    endDate: "range02",
  },
  {
    type: "date",
    subType: "rangeTime",
    field: "rangeTime",
    label: "日期时间范围",
    placeholder: "输入日期时间范围",
    span: "6",
    required: false,
    startDate: "rangeTime01",
    endDate: "rangeTime02",
  },
  {
    type: "select",
    subType: "select",
    field: "select",
    label: "选择",
    vsCode: "vueSelectSex",
    placeholder: "请选择",
    span: "6",
    required: false,
  },
  {
    type: "select",
    subType: "multiple",
    field: "multiple",
    label: "多选",
    vsCode: "vueSelectCity",
    placeholder: "请选择",
    span: "12",
    required: false,
  },
  {
    type: "select",
    subType: "tags",
    field: "tags",
    label: "多选",
    vsCode: "vueSelectCity",
    placeholder: "请选择",
    span: "12",
    required: false,
  },
  {
    type: "textarea",
    field: "textarea",
    label: "大文本",
    placeholder: "输入大文本",
    span: "24",
    required: false,
  },
];

export const vueForm = [
  {
    type: "input",
    subType: "input",
    field: "input",
    label: "文本",
    placeholder: "输入文本",
    span: "6",
    required: true,
    rule: [
      { required: true, message: "输入文本", trigger: "blur" },
      { min: 1, max: 15, message: "最大输入15字符", trigger: "blur" },
    ],
  },
  {
    type: "input",
    subType: "number",
    field: "number",
    label: "数字",
    placeholder: "输入数字",
    span: "6",
    required: false,
  },
  {
    type: "input",
    subType: "inputSelect",
    field: "inputSelect",
    label: "组合",
    placeholder: "输入",
    span: "6",
    required: false,
    vsCode: "vueSelectSex",
  },
  {
    type: "date",
    subType: "date",
    field: "date",
    label: "日期",
    placeholder: "输入日期",
    span: "6",
    required: false,
  },
  {
    type: "date",
    subType: "year",
    field: "year",
    label: "年",
    placeholder: "输入年",
    span: "6",
    required: false,
  },
  {
    type: "date",
    subType: "month",
    field: "month",
    label: "月",
    placeholder: "输入月",
    span: "6",
    required: false,
  },
  {
    type: "date",
    subType: "week",
    field: "week",
    label: "周",
    placeholder: "输入周",
    span: "6",
    required: false,
  },
  {
    type: "date",
    subType: "dateTime",
    field: "dateTime",
    label: "日期时间",
    placeholder: "输入日期时间",
    span: "6",
    required: false,
  },
  {
    type: "range",
    subType: "range",
    field: "range",
    label: "日期范围",
    placeholder: "输入日期范围",
    span: "6",
    required: false,
    startDate: "range01",
    endDate: "range02",
  },
  {
    type: "range",
    subType: "rangeTime",
    field: "rangeTime",
    label: "日期时间范围",
    placeholder: "输入日期时间范围",
    span: "6",
    required: false,
    startDate: "rangeTime01",
    endDate: "rangeTime02",
  },
  {
    type: "select",
    subType: "select",
    field: "select",
    label: "选择",
    vsCode: "vueSelectSex",
    placeholder: "请选择",
    span: "6",
    required: false,
  },
  {
    type: "select",
    subType: "multiple",
    field: "multiple",
    label: "多选",
    vsCode: "vueSelectCity",
    placeholder: "请选择",
    span: "6",
    required: false,
  },
  {
    type: "select",
    subType: "tags",
    field: "tags",
    label: "多选",
    vsCode: "vueSelectCity",
    placeholder: "请选择",
    span: "6",
    required: false,
  },
  {
    type: "radio",
    subType: "button",
    field: "button-outline",
    label: "单选框",
    vsCode: "vueSelectSex",
    placeholder: "请选择",
    span: "6",
    required: false,
    styleType: "outline",
  },
  {
    type: "radio",
    subType: "button",
    field: "button-solid",
    label: "单选框",
    vsCode: "vueSelectSex",
    placeholder: "请选择",
    span: "6",
    required: false,
    styleType: "solid",
  },
  {
    type: "radio",
    subType: "radio",
    field: "radio",
    label: "单选框",
    vsCode: "vueSelectSex",
    placeholder: "请选择",
    span: "6",
    required: false,
  },
  {
    type: "checkbox",
    subType: "checkbox",
    field: "checkbox",
    label: "多选框",
    vsCode: "vueSelectSex",
    placeholder: "请选",
    span: "6",
    required: false,
  },
  {
    type: "input",
    subType: "textarea",
    field: "textarea",
    label: "大文本",
    placeholder: "输入大文本",
    span: "12",
    required: false,
  },
  {
    type: "upload",
    subType: "picture-card",
    field: "picture-card",
    label: "附件",
    placeholder: "输入大文本",
    span: "12",
    required: false,
    fileUrl: "", // 上传附件地址
    fileListUrl: "", // 查询附件列表
    fileDelete: "", // 附件删除地址
    fileCode: "pictureCard", // 附件存储编码
  },
  {
    type: "upload",
    subType: "picture",
    field: "picture",
    label: "附件",
    placeholder: "输入大文本",
    span: "12",
    required: false,
    fileUrl: "", // 上传附件地址
    fileListUrl: "", // 查询附件列表
    fileDelete: "", // 附件删除地址
    fileCode: "picture", // 附件存储编码
  },
  {
    type: "upload",
    subType: "text",
    field: "text",
    label: "附件",
    placeholder: "输入大文本",
    span: "12",
    required: false,
    fileUrl: "", // 上传附件地址
    fileListUrl: "", // 查询附件列表
    fileDelete: "", // 附件删除地址
    fileCode: "text", // 附件存储编码
  },
];
